<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<style type="text/css">
ul.rightTools {
	float: right;
	display: block;
}

ul.rightTools li {
	float: left;
	display: block;
	margin-left: 5px
}
</style>
<form id="pagerForm" method="get" model="viewRequest" action="#rel#">
	<input type="hidden" name="viewRequest.page" value="${page.number}" />
	<input type="hidden" name="viewRequest.size" value="${page.size}" />
	<c:forEach items="${viewRequest.params}" var="params">
		<input type="hidden" id="${params.key}"
			name="viewRequest.params['${params.key}']" value="${params.value}" />
	</c:forEach>
	<c:forEach items="${viewRequest.sort}" var="sort">
		<input type="hidden" name="viewRequest.sort.${sort.key}"
			value="${sort.value}" />
	</c:forEach>
</form>
<div class="pageContent">
	<div style="float: right; display: block; overflow: auto; width: 490px; border: solid 1px #CCC; line-height: 21px; background: #fff">
				<div class="pageHeader">
			<form rel="pagerForm"
				onsubmit="return dialogSearchT(this);"
				action="${rootUrl}/goods/type-value!dialog" method="get">
			<div class="searchBar">
					<ul class="searchContent">
						<li><label>类型值：</label> 
						<input type="text" name="search_content" id="search_content2" value="${search_content}" />
						</li>
						<li>
						<input type="hidden" name="typeClassId" value="${typeClassId}" />
						</li>
					</ul>
					<div class="subBar">
						<ul>
							<li><div class="buttonActive">
									<div class="buttonContent">
										<button type="submit">检索</button>
									</div>
								</div></li>
						</ul>
					</div>
				</div>
			</form>
		</div>
		<table class="table" id="jbsxBox11" layoutH="128">
		<thead>
			<tr>
				<th width="150">商品类型名称</th>
				<th width="150">商品类型值名称</th>
				<th width="100">是否显示</th>
				<th width="50">排序</th>
				<th width="30">操作</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.content}" var="typeValue" varStatus="status">
			<tr target="data_id" rel="${typeValue.id}">
				<td>${typeValue.typeClass.name}</td>
				<td>${typeValue.name}</td>
				<td>${typeValue.isShow==1?"显示":"隐藏"}</td>
				<td>${typeValue.sort}</td>
				<td>
					<a class="btnSelect" href="javascript:$.bringBack({typeClassId:'${typeValue.typeClass.id}', typeClassCode:'${typeValue.typeClass.code}', typeClassName:'${typeValue.typeClass.name}', typeValueId:'${typeValue.id}', typeValueName:'${typeValue.name}'})" title="查找带回">选择</a>
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
		<div class="panelBar">
	<div class="pages">
		<span>显示</span> <select class="combox" name="numPerPage"
			onchange="dialogPageBreak({numPerPage:this.value})">
			<option value="${page.size}">${page.size}</option>
			<option value="20">20</option>
			<option value="50">50</option>
			<option value="100">100</option>
			<option value="200">200</option>
		</select> <span>条，共${page.totalElements}条 </span>
	</div>
	<div class="pagination" rel="jbsxBox11" targetType="dialog"
		totalCount="${page.totalElements}" numPerPage="${page.size}"
		pageNumShown="10" currentPage="${page.number}"></div>
	</div>
   </div>
	</div>
<script>
function dialogSearchT(){
	var rel = "jbsxBox11";
	var url = "${rootUrl}/goods/type-value!dialog?typeClassId="+${typeClassId}+"&search_content="+$("#search_content2").val();
	var $rel = $("#"+rel);
	$rel.loadUrl(url, {}, function(){
		$rel.find("[layoutH]").layoutH();
	});
	return false;
}
</script>
